

AC_DEFUN([IC_TOOL_CHECK],
[
   IC_ENTER([$0])
   AC_MSG_CHECKING([for cross compiling])
   if test $build != $host; then
      host_prefix=$host_cpu-;
      AC_MSG_RESULT([yes])
      AC_MSG_NOTICE([setting host_prefix])
   else
      host_prefix=;
      AC_MSG_RESULT([no])
      AC_MSG_NOTICE([leaving host_prefix blank])
   fi
   IC_LEAVE([$0])
])


AC_DEFUN([IC_PLATFORM_CONFIG],
[
   IC_ENTER([$0])
   AC_MSG_NOTICE([lookin for supported host type])
   AC_MSG_CHECKING([for avr platform])
   case $host in
      avr-unknown-*)
         AC_MSG_RESULT([yes])
         AC_MSG_NOTICE([lookin for supported mcu type])
         AC_MSG_CHECKING([for mcu type])
         case $mcu in
            atmega* | attiny* | at90* | xmega*)
               AC_MSG_RESULT([$mcu])
               have_avr8_build=true;
               ;;
            *)
               if test "x$mcu" != "x"; then
                  AC_MSG_RESULT([$mcu])
                  AC_MSG_WARN([unknown mcu type])
                  have_avr8_build=true;
               else
                  AC_MSG_RESULT([no])
                  AC_MSG_ERROR([no mcu type given])
               fi;
               ;;
         esac;
         ;;
      *)
         AC_MSG_RESULT([no])
         ;;
      esac;
   IC_LEAVE([$0])
])


AC_DEFUN([IC_ENTER], [ AC_MSG_NOTICE([[>>> $1]]) ])
AC_DEFUN([IC_LEAVE], [ AC_MSG_NOTICE([[<<< $1]]) ])


